An executable unit managed by an operating system scheduler 由操作系統(tǒng)排程程序所管理的可執(zhí)行單元。
A program executes when the system scheduler gives execution control to one of the program s threads 當系統(tǒng)計劃程序給程序的線程之一執(zhí)行控制權(quán)時,程序便執(zhí)行。
It consists of a stack , the state of the cpu registers , and an entry in the execution list of the system scheduler 它由堆棧、 cpu注冊的狀態(tài)和系統(tǒng)計劃程序的執(zhí)行列表中的項組成。
I just wanted to focus attention on the fact that an application is , at bottom , a selfish thread that grabs the cpu and tries to hold on until it exits and that the operating system scheduler acts like a playground monitor to make a bunch of selfish threads play well together 我還向關(guān)注這樣一個事實,實際上一個應(yīng)用是:一個自私的線程攫取了cpu并且試圖只要它存在就持續(xù)的(占用) ,而且操作系統(tǒng)時間表扮演一個運動場的監(jiān)控器,它要讓一串自私的線程共同良好的比賽。
Context switching occurs when the operating system scheduler replaces one process operating on a cpu with another process and is the result of a variety of factors , such as job or process priority , waiting for other resources like i o , if the process is using up all of its allocated cpu cycles time slice , and so on 上下文切換是在操作系統(tǒng)調(diào)度程序用另一個進程替換cpu上正在運行的一個進程時發(fā)生的,而且是各種因素作用的結(jié)果,例如作業(yè)(或進程)優(yōu)先級、是否等待其他資源(如i / o ) 、進程是否將用完所有分配給它的cpu周期(時間片)等。